from sort_A_simply_sort import simply_sort

n, nums = int(input()), simply_sort(list(map(int ,input().split())))

print(nums)

for i in range(len(nums) - 1, -1, -1):
    print(nums[i], end="")
